home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / think / AmiChess.lha / AmiChess / src / common.h < prev    next >
C/C++ Source or Header  |  2002-10-13  |  16KB  |  644 lines

  1. #ifndef COMMON_H
  2. #define COMMON_H
  3.  
  4. #include "config.h"
  5.  
  6. typedef unsigned long long BitBoard;
  7. typedef unsigned long long HashType;
  8. typedef unsigned long KeyType;
  9.  
  10. typedef struct 
  11. {
  12. BitBoard b[2][7];
  13. BitBoard friends[2];
  14. BitBoard blocker;
  15. BitBoard blockerr90;
  16. BitBoard blockerr45;
  17. BitBoard blockerr315;
  18. short ep;
  19. short flag;
  20. short side;
  21. short material[2];
  22. short pmaterial[2];
  23. short castled[2];
  24. short king[2];
  25. } Board; 
  26.  
  27. typedef struct
  28. {
  29. int move;
  30. int score; 
  31. } leaf;
  32.  
  33. typedef struct
  34. {
  35. int move;
  36. short epsq; 
  37. short bflag;
  38. short Game50;
  39. short mvboard;
  40. float et;
  41. HashType hashkey;
  42. HashType phashkey;
  43. char SANmv[8];
  44. } GameRec;
  45.  
  46. typedef struct
  47. {
  48. KeyType key; 
  49. int move;
  50. int score;
  51. short flag;
  52. short depth;
  53. } HashSlot; 
  54.  
  55. typedef struct
  56. {
  57. KeyType pkey; 
  58. BitBoard passed;
  59. BitBoard weaked;
  60. short score;
  61. short phase;
  62. } PawnSlot;
  63.  
  64.  
  65. /* MACRO definitions */
  66.  
  67. #define MAX(a,b) ((a)>(b)?(a):(b))
  68. #define MIN(a,b) ((a)<(b)?(a):(b))
  69. #define SET(a,b) (a|=b)
  70. #define CLEAR(a,b) (a&=~b)
  71. #define DRAWSCORE (computerplays==board.side?(opprating-myrating)/4:(myrating-opprating)/4)
  72. #define MATERIAL (board.material[side]-board.material[1^side])
  73. #define PHASE (8-(board.material[white]+board.material[black])/1150)
  74. #define KEY(a) (a>>32) 
  75.  
  76. /* Attack MACROS */
  77.  
  78. #define BishopAttack(sq) (Bishop45Atak[sq][(board.blockerr45>>Shift45[sq])&Mask45[sq]]|Bishop315Atak[sq][(board.blockerr315>>Shift315[sq])&Mask315[sq]])
  79. #define RookAttack(sq) (Rook00Atak[sq][(board.blocker>>Shift00[sq])&0xFF]|Rook90Atak[sq][(board.blockerr90>>Shift90[sq])&0xFF])
  80. #define QueenAttack(sq) (BishopAttack(sq)|RookAttack(sq))
  81.  
  82.  
  83. /* Some bit macros */
  84.  
  85. /*
  86. * gcc 2.95.4 completely screws up the macros with lookup tables 
  87. * with -O2 on PPC,maybe this check has to be refined.(I don't know
  88. * whether other architectures also suffer from this gcc bug.) However,
  89. * with gcc 3.0,the lookup tables are _much_ faster than this direct
  90. * calculation.
  91. */
  92. #if defined(__GNUC__) && defined(__PPC__) && __GNUC__ < 3
  93. #define SETBIT(b,i) ((b)|=((1ULL<<63)>>(i)))
  94. #define CLEARBIT(b,i) ((b)&=~((1ULL<<63)>>(i)))
  95. #else
  96. #define SETBIT(b,i) ((b)|=BitPosArray[i])
  97. #define CLEARBIT(b,i) ((b)&=NotBitPosArray[i])
  98. #endif
  99.  
  100. #define RANK(i) ((i)>>3)
  101. #define ROW(i) ((i)&7)
  102. #define trailz(b) (leadz((b)&((~b)+1)))
  103.  
  104. #define PROMOTEPIECE(a) ((a>>12)&0x0007)
  105. #define CAPTUREPIECE(a) ((a>>15)&0x0007)
  106. #define TOSQ(a) ((a)&0x003F)
  107. #define FROMSQ(a) ((a>>6)&0x003F)
  108. #define MOVE(a,b) (((a)<<6)|(b))
  109.  
  110. #define white 0
  111. #define black 1
  112. #define false 0
  113. #define true 1
  114. #define ks 0
  115. #define qs 1
  116. #define INFINITY 32767
  117. #define MATE 32767
  118. #define MATESCORE(a)    ((a)>MATE-255||(a)<-MATE+255)
  119.  
  120. /* constants for Board */
  121. #define WKINGCASTLE 0x0001
  122. #define WQUEENCASTLE 0x0002
  123. #define BKINGCASTLE 0x0004
  124. #define BQUEENCASTLE 0x0008
  125. #define WCASTLE (WKINGCASTLE|WQUEENCASTLE)
  126. #define BCASTLE (BKINGCASTLE|BQUEENCASTLE)
  127.  
  128. /* Material values */
  129. #define ValueP 100    
  130. #define ValueN 350
  131. #define ValueB 350
  132. #define ValueR 550
  133. #define ValueQ 1100
  134. #define ValueK 2000
  135.  
  136. /* constants for move description */
  137. #define KNIGHTPRM 0x00002000
  138. #define BISHOPPRM 0x00003000 
  139. #define ROOKPRM 0x00004000
  140. #define QUEENPRM 0x00005000
  141. #define PROMOTION 0x00007000
  142. #define PAWNCAP 0x00008000
  143. #define KNIGHTCAP 0x00010000 
  144. #define BISHOPCAP 0x00018000
  145. #define ROOKCAP 0x00020000 
  146. #define QUEENCAP 0x00028000 
  147. #define CAPTURE 0x00038000 
  148. #define NULLMOVE 0x00100000 
  149. #define CASTLING 0x00200000 
  150. #define ENPASSANT 0x00400000
  151. #define MOVEMASK (CASTLING|ENPASSANT|PROMOTION|0x0FFF)
  152.  
  153. /* Some special BitBoards */
  154. #define NULLBITBOARD (0x0000000000000000ULL)
  155. #define WHITESQUARES (0x55AA55AA55AA55AAULL)
  156. #define BLACKSQUARES (0xAA55AA55AA55AA55ULL)
  157. #define CENTRESQUARES (0x0000001818000000ULL)
  158. #define COMPUTERHALF (0xFFFFFFFF00000000ULL)
  159. #define OPPONENTHALF (0x00000000FFFFFFFFULL)
  160.  
  161. /* Game flags */
  162. #define QUIT 0x0001
  163. #define TESTT 0x0002
  164. #define THINK 0x0004
  165. #define MANUAL 0x0008
  166. #define TIMEOUT 0x0010
  167. #define DEBUGG 0x0020
  168. #define ENDED 0x0040
  169. #define USEHASH 0x0080
  170. #define SOLVE 0x0100
  171. #define USENULL 0x0200
  172. #define TIMECTL 0x0800
  173. #define POST 0x1000
  174. #define AUTOPLAY 0x2000
  175. #define SUPERVISOR 0x4000
  176. #define REVERSEBOARD 0x8000
  177.  
  178. /* Node types */ 
  179. #define PV 0
  180. #define ALL 1
  181. #define CUT 2
  182.  
  183. /* Transposition table flags */
  184. #define EXACTSCORE 1
  185. #define LOWERBOUND 2
  186. #define UPPERBOUND 3
  187. #define POORDRAFT 4
  188. #define QUIESCENT 5
  189. #define STICKY 8
  190.  
  191. /* Book modes */
  192. #define BOOKOFF 0
  193. #define BOOKRAND 1
  194. #define BOOKBEST 2
  195. #define BOOKWORST 3
  196. #define BOOKPREFER 4
  197.  
  198. /* The various phases during move selection */
  199. #define PICKHASH 1
  200. #define PICKGEN1 2
  201. #define PICKCAPT 3
  202. #define PICKKILL1 4
  203. #define PICKKILL2 5
  204. #define PICKGEN2 6
  205. #define PICKHIST 7
  206. #define PICKREST 8
  207. #define PICKCOUNTER 9
  208.  
  209. #define MAXTREEDEPTH 2000
  210. #define MAXPLYDEPTH 65
  211. #define MAXGAMEDEPTH 600
  212.  
  213. /* 
  214. Smaller HASHSLOT defaults 20011017 to improve blitz play
  215. and make it easier to run on old machines
  216. */
  217. #define HASHSLOTS 1024 
  218. #define PAWNSLOTS 512
  219.  
  220. #define DEPTH    12
  221.  
  222. extern short distance[64][64];
  223. extern short taxicab[64][64];
  224. extern unsigned char lzArray[65536];
  225. extern short Shift00[64];
  226. extern short Shift90[64];
  227. extern short Shift45[64];
  228. extern short Shift315[64];
  229. extern BitBoard DistMap[64][8];
  230. extern BitBoard BitPosArray[64];
  231. extern BitBoard NotBitPosArray[64];
  232. extern BitBoard MoveArray[8][64];
  233. extern BitBoard Ray[64][8];
  234. extern BitBoard FromToRay[64][64];
  235. extern BitBoard RankBit[8];
  236. extern BitBoard FileBit[8];
  237. extern BitBoard Ataks[2][7];
  238. extern BitBoard PassedPawnMask[2][64];
  239. extern BitBoard IsolaniMask[8];
  240. extern BitBoard SquarePawnMask[2][64];
  241. extern BitBoard Rook00Atak[64][256]; 
  242. extern BitBoard Rook90Atak[64][256]; 
  243. extern BitBoard Bishop45Atak[64][256];
  244. extern BitBoard Bishop315Atak[64][256];
  245. extern BitBoard pinned;
  246. extern BitBoard rings[4];
  247. extern BitBoard stonewall[2];
  248. extern BitBoard pieces[2];
  249. extern BitBoard mask_kr_trapped_w[3];
  250. extern BitBoard mask_kr_trapped_b[3];
  251. extern BitBoard mask_qr_trapped_w[3];
  252. extern BitBoard mask_qr_trapped_b[3];
  253. extern BitBoard boardhalf[2];
  254. extern BitBoard boardside[2];
  255. extern short directions[64][64];
  256. extern unsigned char BitCount[65536];
  257. extern leaf Tree[MAXTREEDEPTH];
  258. extern leaf *TreePtr[MAXPLYDEPTH];
  259. extern int RootPV;
  260. extern GameRec Game[MAXGAMEDEPTH];
  261. extern short GameCnt;
  262. extern short computer;
  263. extern unsigned int flags;
  264. extern Board board;
  265. extern short cboard[64];
  266. extern short Mvboard[64];
  267. extern HashType hashcode[2][7][64];
  268. extern HashType ephash[64];
  269. extern HashType WKCastlehash;
  270. extern HashType WQCastlehash;
  271. extern HashType BKCastlehash;
  272. extern HashType BQCastlehash;
  273. extern HashType Sidehash;
  274. extern HashType HashKey;
  275. extern HashType PawnHashKey;
  276. extern HashSlot *HashTab[2];
  277. extern PawnSlot *PawnTab[2];
  278. extern short Idepth;
  279. extern short SxDec;
  280. extern short Game50;
  281. extern int lazyscore[2];
  282. extern int maxposnscore[2];
  283. extern int rootscore;
  284. extern int lastrootscore;
  285. extern unsigned long GenCnt;
  286. extern unsigned long NodeCnt;
  287. extern unsigned long QuiesCnt;
  288. extern unsigned long EvalCnt;
  289. extern unsigned long EvalCall;
  290. extern unsigned long ChkExtCnt;
  291. extern unsigned long OneRepCnt;
  292. extern unsigned long RcpExtCnt;
  293. extern unsigned long PawnExtCnt;
  294. extern unsigned long HorzExtCnt;
  295. extern unsigned long ThrtExtCnt;
  296. extern unsigned long KingExtCnt;
  297. extern unsigned long NullCutCnt;
  298. extern unsigned long FutlCutCnt;
  299. extern unsigned long RazrCutCnt;
  300. extern unsigned long TotalGetHashCnt;
  301. extern unsigned long GoodGetHashCnt;
  302. extern unsigned long TotalPutHashCnt;
  303. extern unsigned long CollHashCnt;
  304. extern unsigned long TotalPawnHashCnt;
  305. extern unsigned long GoodPawnHashCnt;
  306. extern unsigned long RepeatCnt;
  307. extern unsigned HashSize;
  308. extern unsigned long TTHashMask;
  309. extern unsigned long PHashMask;
  310. extern short slider[8];
  311. extern short Value[7];
  312. extern char SANmv[10];
  313. extern unsigned long history[2][4096];
  314. extern int killer1[MAXPLYDEPTH];
  315. extern int killer2[MAXPLYDEPTH];
  316. extern short ChkCnt[MAXPLYDEPTH];
  317. extern short ThrtCnt[MAXPLYDEPTH];
  318. extern char id[32];
  319. extern char solution[64];
  320. /*
  321. * XXX: This variable et also exists as a local variable somewhere and
  322. * to complete the confusion,this came up in three different
  323. * flavours: long,float and double.
  324. */
  325. extern double et;
  326. extern float SearchTime;
  327. extern short SearchDepth;
  328. extern short MoveLimit[2];
  329. extern float TimeLimit[2];
  330. extern short TCMove;
  331. extern short TCinc;
  332. extern float TCTime;
  333. extern short hunged[2];
  334. extern short phase;
  335. extern int Hashmv[MAXPLYDEPTH];
  336. extern short DebugPly;
  337. extern short DebugDepth;
  338. extern long DebugNode;
  339. extern int Debugmv[MAXPLYDEPTH];
  340. extern short Debugmvl;
  341. extern short Debugline;
  342. extern short RootPieces;
  343. extern short RootPawns;
  344. extern short RootMaterial;
  345. extern short RootAlpha;
  346. extern short RootBeta;
  347. extern short pickphase[MAXPLYDEPTH];
  348. extern short InChk[MAXPLYDEPTH];
  349. extern short KingThrt[2][MAXPLYDEPTH];
  350. extern short threatmv;
  351. extern short threatply;
  352. extern short KingSafety[2];
  353. extern short pscore[64];
  354.  
  355. extern short bookmode;
  356. extern short bookfirstlast;
  357.  
  358. extern short range[8];
  359. extern short ptype[2];
  360. extern char algbr[64][3];
  361. extern char algbrfile[9];
  362. extern char algbrrank[9];
  363. extern char notation[8];
  364. extern char lnotation[8];
  365. extern short r90[64];
  366. extern short r45[64];
  367. extern short r315[64];
  368. extern short Mask45[64];
  369. extern short Mask315[64];
  370. extern short myrating,opprating,suddendeath;
  371. extern char name[50];
  372. extern short computerplays;
  373. extern short wasbookmove;
  374. extern int nmovesfrombook;
  375. extern float maxtime;
  376. extern short n;         /* Last mobility returned by CTL */
  377. extern short ExchCnt[2];
  378. extern int newpos,existpos;        /* For book statistics */
  379. extern short bookloaded;
  380.  
  381. enum Piece { empty,pawn,knight,bishop,rook,queen,king,bpawn };
  382.  
  383. enum Square {
  384. A1,B1,C1,D1,E1,F1,G1,H1,
  385. A2,B2,C2,D2,E2,F2,G2,H2,
  386. A3,B3,C3,D3,E3,F3,G3,H3,
  387. A4,B4,C4,D4,E4,F4,G4,H4,
  388. A5,B5,C5,D5,E5,F5,G5,H5,
  389. A6,B6,C6,D6,E6,F6,G6,H6,
  390. A7,B7,C7,D7,E7,F7,G7,H7,
  391. A8,B8,C8,D8,E8,F8,G8,H8
  392. };
  393.  
  394. enum File { A_FILE,B_FILE,C_FILE,D_FILE,E_FILE,F_FILE,G_FILE,H_FILE };
  395.  
  396. /****************************************************************************
  397. *
  398. * The various function prototypes. They are group into the *.c files
  399. * in which they are defined.
  400. *
  401. ****************************************************************************/
  402.  
  403. /*
  404. * Explanation of the #ifdef NO_INLINE conditionals:
  405. *
  406. * Define NO_INLINE only if you really must,implementations will be
  407. * provided by the corresponding *.c files. The better solution is to
  408. * not define it,in which case inlines.h will be included which
  409. * provides static inline version of these functions.
  410. */
  411.  
  412. /* The initialization routines */
  413. void Initialize();
  414. void InitLzArray();
  415. void InitBitPosArray();
  416. void InitMoveArray();
  417. void InitRay();
  418. void InitFromToRay();
  419. void InitRankFileBit();
  420. void InitBitCount();
  421. void InitPassedPawnMask();
  422. void InitIsolaniMask();
  423. void InitSquarePawnMask();
  424. void InitRandomMasks();
  425. void InitRotAtak();
  426. void InitDistance();
  427. void InitVars();
  428. void InitHashCode();
  429. void InitHashTable();
  430. void NewPosition();
  431. void InitFICS();
  432.  
  433. /* The book routines */
  434. void MakeBinBook(char *,short);
  435. int BookQuery();
  436. int BookBuilderOpen();
  437. int BookBuilder(short result,short side);
  438. int BookBuilderClose();
  439.  
  440. /*
  441. * Return values(errorcodes) for the book routines,
  442. * maybe one should have a global enum of errorcodes
  443. */
  444. enum {
  445. BOOK_SUCCESS,
  446. BOOK_EFORMAT,/* Wrong format(e.g. produced by older version) */
  447. BOOK_EMIDGAME,/* Move is past the opening book's move limit */ 
  448. BOOK_EIO,/* I/O error,e.g. caused by wrong permissions */
  449. BOOK_EFULL,/* Book hash is full,new position was not added. */
  450. BOOK_ENOBOOK,/* No book present */
  451. BOOK_ENOMOVES,/* No moves found(in BookQuery() only) */
  452. BOOK_ENOMEM /* Memory allocation failed */
  453. };
  454.  
  455. /* The move generation routines */
  456. void GenMoves(short);
  457. void GenCaptures(short);
  458. void GenNonCaptures(short);
  459. void GenCheckEscapes(short);
  460. void FilterIllegalMoves(short);
  461.  
  462. /* The move routines */
  463. void MakeMove(short,int *);
  464. void UnmakeMove(short,int *);
  465. void MakeNullMove(short);
  466. void UnmakeNullMove(short);
  467. void SANMove(int,short);
  468. leaf *ValidateMove(char *);
  469. leaf *IsInMoveList(short,short,short,char);
  470. short IsLegalMove(int);
  471. char *AlgbrMove(int);
  472.  
  473. /* The attack routines */
  474. short SqAtakd(short,short);
  475. void GenAtaks();
  476. BitBoard AttackTo(short,short);
  477. BitBoard AttackXTo(short,short);
  478. BitBoard AttackFrom(short,short,short);
  479. BitBoard AttackXFrom(short,short);
  480. short PinnedOnKing(short,short);
  481. void FindPins(BitBoard *);
  482. short MateScan(short);
  483.  
  484. /* The swap routines */
  485. short SwapOff(int);
  486. void AddXrayPiece(short,short,short,BitBoard *,BitBoard *);
  487.  
  488. /* The EPD routines */
  489. short ReadEPDFile(const char *,short);
  490. void ParseEPD(char *);
  491. void LoadEPD(char *);
  492. void SaveEPD(char *);
  493.  
  494. /* The command routines */
  495. short InputCmd(char *);
  496. void ShowCmd(char *);
  497. void BookCmd(char *);
  498.  
  499. /* Some utility routines */
  500. #ifdef NO_INLINE
  501. unsigned char leadz(BitBoard);
  502. unsigned char nbits(BitBoard);
  503. #endif
  504.  
  505. void UpdateFriends();
  506. void UpdateCBoard();
  507. void UpdateMvboard();
  508. void EndSearch(int);
  509. short ValidateBoard();
  510.  
  511. /* PGN routines */
  512. void PGNSaveToFile(const char *,const char *);
  513. void PGNReadFromFile(const char *);
  514. void BookPGNReadFromFile(const char *);
  515.  
  516. /* The hash routines */
  517. void CalcHashKey();
  518. void ShowHashKey(HashType);
  519.  
  520. /* The evaluation routines */
  521. int ScoreP(short);
  522. int ScoreN(short);
  523. int ScoreB(short);
  524. int ScoreR(short);
  525. int ScoreQ(short);
  526. int ScoreK(short);
  527. int ScoreDev(short);
  528. int Evaluate(int,int);
  529. short EvaluateDraw();
  530.  
  531. /* Hung routines */
  532. short EvalHung(short);
  533.  
  534. /* The search routines */
  535. void Iterate();
  536. int Search(short,short,int,int,short);
  537. int SearchRoot(short,int,int);
  538. int Quiesce(short,int,int);
  539. void pick(leaf *,short);
  540. short Repeat();
  541. void ShowLine(int,int,char);
  542. void GetElapsed();
  543.  
  544. /* The transposition table routies */
  545. void TTPut(short,short,short,int,int,int,int);
  546. short TTGet(short,short,short,int,int,int *,int *);
  547. short TTGetPV(short,short,int,int *);
  548. void TTClear();
  549. void PTClear();
  550.  
  551. /* Sorting routines */
  552. void SortCaptures(short);
  553. void SortMoves(short);
  554. void SortRoot();
  555. short PhasePick(leaf **,short);
  556. short PhasePick1(leaf **,short);
  557.  
  558. /* Some output routines */
  559. void ShowMoveList(short);
  560. void ShowSmallBoard();
  561. void ShowBoard();
  562. void ShowBitBoard(BitBoard *);
  563. void ShowCBoard();
  564. void ShowMvboard();
  565.  
  566. void ShowGame();
  567. void ShowTime();
  568.  
  569. /* Random numbers routines */
  570. unsigned int Rand32();
  571. HashType Rand64();
  572.  
  573. /* Solver routines */
  574. void Solve(char *);
  575.  
  576. /* Miscellaneous routines */
  577. void ShowHelp(const char *);
  578.  
  579. /* Player database */
  580. void DBSortPlayer(const char *style);
  581. void DBListPlayer(const char *style);     
  582. void DBReadPlayer();    
  583. void DBWritePlayer();
  584. int DBSearchPlayer(const char *player);
  585. void DBUpdatePlayer(const char *player,const char *resultstr);
  586. void DBTest();
  587.  
  588. #ifndef NO_INLINE
  589. # include "inlines.h"
  590. #endif
  591.  
  592. extern void *mui_app;
  593.  
  594. enum
  595. {
  596. MUIM_Chess_New=0x80660000,
  597. MUIM_Chess_OpenEPD,
  598. MUIM_Chess_OpenPGN,
  599. MUIM_Chess_SaveEPD,
  600. MUIM_Chess_SavePGN,
  601. MUIM_Chess_Autoplay,
  602. MUIM_Chess_SwapSides,
  603. MUIM_Chess_SwitchSides,
  604. MUIM_Chess_Hint,
  605. MUIM_Chess_Undo,
  606. MUIM_Chess_Remove,
  607. MUIM_Chess_WinOpen,
  608. MUIM_Chess_ShowBoard,
  609. MUIM_Chess_Post,
  610. MUIM_Chess_Depth,
  611. MUIM_Chess_Time,
  612. MUIM_Chess_ShowThinking,
  613. MUIM_Chess_Supervisor,
  614. MUIM_Chess_NullMove,
  615. MUIM_Chess_BookAdd,
  616. MUIM_Chess_BookOff,
  617. MUIM_Chess_BookOn,
  618. MUIM_Chess_BookBest,
  619. MUIM_Chess_BookWorst,
  620. MUIM_Chess_BookRandom,
  621. MUIM_Chess_ReverseBoard,
  622. MUIM_Chess_MyMove,
  623. MUIM_Chess_Side,
  624. MUIM_Chess_Skin,
  625. MUIM_Chess_ClearFlag,
  626. MUIM_Chess_AddMove,
  627. MUIM_Chess_ClearList
  628. };
  629.  
  630. struct MUIP_Chess_ShowThinking {unsigned long MethodID; char *line; };
  631. struct MUIP_Chess_Post {unsigned long MethodID; int value; };
  632. struct MUIP_Chess_NullMove {unsigned long MethodID; int value; };
  633. struct MUIP_Chess_Supervisor {unsigned long MethodID; int value; };
  634. struct MUIP_Chess_Depth {unsigned long MethodID; int depth; };
  635. struct MUIP_Chess_Time { unsigned long MethodID; int flag; };
  636. struct MUIP_Chess_ReverseBoard {unsigned long MethodID; int reverse; };
  637. struct MUIP_Chess_Autoplay {unsigned long MethodID; int autoplay; };
  638. struct MUIP_Chess_MyMove {unsigned long MethodID; char *move; };
  639. struct MUIP_Chess_Skin { unsigned long MethodID; void *menu; };
  640. struct MUIP_Chess_ClearFlag { unsigned long MethodID; int flag; };
  641. struct MUIP_Chess_AddMove { unsigned long MethodID; int side; char *move; };
  642.  
  643. #endif
  644.